package ${domain}.frame.mail.message;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**
 * 发送内联形式html邮件，通常用于显示图片等信息
 * <p>
 * WInlineMessage message = new WInlineMessage();
 * message.setSubject("标题");
 * message.setContent("html><body><h2>html邮件内容</h2><br><img src=\'cid:" + resId + "\'></img></body></html>");
 * message.addRes("resId", new File("E:\\1.jpg"));
 * WMailSender.send(message);
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2020-08-01
 */
public class WInlineMessage extends WHtmlMessage {

    private Map<String, File> resMap;

    public Map<String, File> getResMap() {
        return resMap;
    }

    public void setResMap(Map<String, File> resMap) {
        this.resMap = resMap;
    }

    public void addRes(String resId, File file) {
        if (resMap == null) resMap = new HashMap<>();
        resMap.put(resId, file);
    }
}
